package com.luguangtao;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableFeignClients   //客户端
@RestController
@EnableCircuitBreaker   //熔断器超时设置
@EnableHystrix  //是否熔断
public class RibbonTest1 {
    public static void main(String[] args) {
        SpringApplication.run(RibbonTest1.class);
    }

    @RequestMapping("test41")
    public String test41(){
        System.out.println("============健康啦=======");
        return "test01--->ok";
    }
}
